//
//  FloorCollectionViewHeader.m
//  OfficeBook
//
//  Created by 孙晓奇 on 15/9/23.
//  Copyright © 2015年 sunny. All rights reserved.
//

#import "FloorCollectionViewHeader.h"

@interface FloorCollectionViewHeader()
@property (nonatomic, strong) UILabel *titleLabel;
@end

@implementation FloorCollectionViewHeader

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor colorWithHexString:@"#dae2e4"];
        
        self.titleLabel = [[UILabel alloc] init];
        self.titleLabel.autoresizingMask =  (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin);
        self.titleLabel.font = [UIFont systemFontOfSize:16];
        [self addSubview:self.titleLabel];
        
        [self.titleLabel makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.left).offset(10);
            make.centerY.equalTo(self.centerY);
        }];
        
    }
    return self;
}

@synthesize title = _title;
-(void)setTitle:(NSString *)title{
    _title = title;
    self.titleLabel.text = title;
}
@end
